(function(A){
	A.fn.easySlider=function(B){
		var C={
			prevId:"prevBtn",prevText:"",nextId:"nextBtn",nextText:"",controlsShow:true,controlsBefore:"",controlsAfter:"",
			controlsFade:true,firstId:"firstBtn",firstText:"First",firstShow:false,lastId:"lastBtn",
			lastText:"Last",lastShow:false,vertical:false,speed:800,auto:false,pause:5000,continuous:false
		};
		var B=A.extend(C,B);
		this.each(function(){
			var E=A(this);
			var L=A("li",E).length;
			var J=A("li",E).width();
			var F=A("li",E).height();
			E.width(J);
			E.height(F);
			E.css("overflow","hidden");
			var H=L-1;
			var K=0;
			A("ul",E).css("width",L*J);
			if(!B.vertical){
				A("li",E).css("float","left")
			}
			if(B.controlsShow){var G=B.controlsBefore;
				if(B.firstShow){
					G+='<span id="'+B.firstId+'"><a href="javascript:void(0);">'+B.firstText+"</a></span>"
				}
				G+=' <span id="'+B.prevId+'"><a href="javascript:void(0);">'+B.prevText+"</a></span>";
				G+=' <span id="'+B.nextId+'"><a href="javascript:void(0);">'+B.nextText+"</a></span>";
				if(B.lastShow){
					G+=' <span id="'+B.lastId+'"><a href="javascript:void(0);">'+B.lastText+"</a></span>"
				}
				G+=B.controlsAfter;
				A(E).after(G)
			}
			A("a","#"+B.nextId).click(function(){D("next",true)
			});
			A("a","#"+B.prevId).click(function(){D("prev",true)
			});
			A("a","#"+B.firstId).click(function(){D("first",true)
			});
			A("a","#"+B.lastId).click(function(){D("last",true)
			});
			function D(M,N){var O=K;
				switch(M){case"next":K=(O>=H)?(B.continuous?0:H):K+1;
					break;
					case"prev":K=(K<=0)?(B.continuous?H:0):K-1;
					break;
					case"first":K=0;
					break;
					case"last":K=H;
					break;
					default:break
				}
				var Q=Math.abs(O-K);
				var P=Q*B.speed;
				if(!B.vertical){p=(K*J*-1);
					A("ul",E).animate({marginLeft:p},P)
				}else{p=(K*F*-1);
					A("ul",E).animate({marginTop:p},P)
				}if(!B.continuous&&B.controlsFade){
					if(K==H){A("a","#"+B.nextId).hide();
						A("a","#"+B.lastId).hide()
					}else{A("a","#"+B.nextId).show();
						A("a","#"+B.lastId).show()
					}if(K==0){A("a","#"+B.prevId).hide();
						A("a","#"+B.firstId).hide()
					}else{A("a","#"+B.prevId).show();
						A("a","#"+B.firstId).show()
					}
				}
				if(N){
					clearTimeout(I)
				}
				if(B.auto&&M=="next"&&!N){
					I=setTimeout(function(){D("next",false)},Q*B.speed+B.pause)
				}
			}
			var I;
			if(B.auto){
				I=setTimeout(function(){D("next",false)},B.pause)
			}
			if(!B.continuous&&B.controlsFade){A("a","#"+B.prevId).hide();
				A("a","#"+B.firstId).hide()
			}
		}
		)
	}
})(jQuery);
function backtop(){
	$("html,body").animate({scrollTop:"0px"},700);
	return false
}
$(function(){
	var D=$(".show-list li");
	D.mousemove(function(){$(this).children().children("h5").show()});
	D.mouseout(function(){$(this).children().children("h5").hide()});
	$("#chained").scrollable({speed:1000,circular:true,items:".items"}).navigator({navi:".navi-s"}).autoscroll({interval:6000});
	$("#slider").easySlider({controlsBefore:'<p id="controls">',controlsAfter:"</p>",auto:true,continuous:true});
});